package net.kong.sns.rest.client;

/**
 * @author <a href="mailto:lanhuai@gmail.com">Ning Yubin</a>, <a href="mailto:jolestar@gmail.com">Wang Yuanmin</a>
 * @version $Id: KongApiMethod.java,v 1.12.2.2 2009/12/09 10:29:05 wangyuanming Exp $
 */
public enum KongApiMethod {
    //用户API
    USERS_GET_INFO("/users/info", false),
    USERS_GET_LOGGED_IN_USER("/users/loggedinuser", true),
    USERS_GET_STANDARD_INFO("/users/standardinfo", false),
    USERS_IS_APP_USER("/users/appuser", false),
    //好友消息API
    FRIENDS_ARE_FRIENDS("/friends/relation", false),
    FRIENDS_GET("/friends/list", false),
    FRIENDS_GET_APP_USERS("/friends/appusers", true),
    //动态API
    FEED_PUBLISH_USER_ACTION("/feed/publisher", true),
    //消息API
    MESSAGE_SEND("/message/sender", true),
    //注册订单
    PAY_REG_ORDER("/pay/regorder", true),
    //订单是否完成
    PAY_IS_COMPLETED("/pay/iscompleted", false),
    //注册订单
    PAY4TEST_REG_ORDER("/pay4test/regorder", true),
    //订单是否完成
    PAY4TEST_IS_COMPLETED("/pay4test/iscompleted", false),
    
    //授权API
    AUTH_LOGIN("/auth/login",false);
    
    private String method;
    private boolean sessionKeyRequired;

    private KongApiMethod(String method, boolean sessionKeyRequired) {
        this.method = method;
        this.sessionKeyRequired = sessionKeyRequired;
    }

    public String getMethod() {
        return method;
    }

    public boolean isSessionKeyRequired() {
        return sessionKeyRequired;
    }

    @Override
    public String toString() {
        return method;
    }
}